<template>
	<view class="mes" @click="todetail">
		<!-- <img :src="pic" alt="" class="headimg" />
		<view>
			<h2 class="title">{{title}}</h2>
			<view class="content">
				{{content}}
			</view>
		</view> -->
		<img :src="pic" class="headimg" />
		<view>
		  	<h2 class="title"> {{title}} </h2>
			<view class="content">
				{{ content }}
			</view>
		</view>
		<view class="status cu-item text-red" v-if='status==0'>
			<view class="action">
				<view class="cu-tag round bg-red light">匹配中</view>
			</view>
		</view>
		<view class="status cu-item text-green" v-else>
			<view class="action">
				<view class="cu-tag round bg-gradual-green light">已完成</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: ['title', 'pic', 'content', 'status', 'mesid'],
		data() {
			return {}
		},
		methods: {
			todetail() {
				uni.navigateTo({
					url: `/subpkg/mes_detail/mes_detail?id=${this.mesid}`
				})
			},
		}
	};
</script>

<style scoped lang="less">
	.meslist {
		position: relative;
		z-index: 1;
		padding: 18rpx;
	}
	
	/* 单个卡片 */
	.mes {
		align-items: center;
		z-index: 5;
		display: flex;
		border-radius: 10rpx;
		padding-top: 3vh;
		padding-bottom: 3vh;
		box-shadow: 1px 3px 5px 3px #888888;
		background-color: #fefefe;
		margin: 15rpx;
	}
	
	.headimg {
		width: 15vw;
		height: 15vw;
		margin-left: 6rpx;
		border-radius: 75%;
		// margin-bottom: 10rpx;
	}
	
	.content {
		width: 490rpx;
		font-size: 25rpx;
		-webkit-line-clamp: 2;
		margin-left: 15rpx;
	}
	
	.title {
		font-weight: 700;
		font-size: 28rpx;
		margin-left: 15rpx;
	}
	
	.bg {
		width: 100%;
		height: 74%;
		z-index: 0;
		position: absolute;
	}

	.status {
		// margin-top: -15rpx;
		font-size: small;
		margin-right: 5rpx;
	}
</style>